package dto;

import models.MoreInfo;
import play.data.Upload;

import java.util.List;

/**
 * Created by Gipxy group
 * Date: 3/17/12
 */
public class TopicDto {
    public String code;
    public String title;
    public String name;
    public Long topicId;
    public String desc;
    public String language;

    public List<RelatedTopicDto> relateds;

    public Upload relatedPhoto;

    public Upload largePhoto;

    public List<MoreInfo> moreInfos;
    public byte[] relatedPhotoAsBytes;
    public byte[] largePhotoAsBytes;
    
    public String moreInfoAsJson;
    public String relatedTopicsAsJson;
    public String appCode;

    public double cost;

    public String brief;

    public Integer order;

    public int getRelatedPhotoLength() {
        return relatedPhotoAsBytes == null ? 0 : relatedPhotoAsBytes.length;
    }

    public int getLargePhotoLength() {
        return largePhotoAsBytes == null ? 0 : largePhotoAsBytes.length;
    }
}
